//import 'babel-polyfill'
import Vue from 'vue';
import VueRouter from 'vue-router'
import Main from './components/Main.vue';
import JobsView from './components/JobsView.vue';
import ManagersView from './components/ManagersView.vue';
import GlobalTool from './components/GlobalTool.vue';
import JobEdit from './components/JobEdit.vue';
import Home from './components/Home.vue';
Vue.use(VueRouter);
import store from './store'
import Vuex from 'vuex';
Vue.use(Vuex);

const router = new VueRouter({
    routes: [
        {
            path: '/', component: Main ,
            children :[
			
			  {
			     path :"" ,component :Home ,
				 children :[
			
			      { path :"" , component: JobsView },
                  { path :"/managers" , component: ManagersView },
                  { path :"/managers/globaltool" , component: GlobalTool }
			
			     ]  
			  },
		      {
                  path: '/jobs/new', component: JobEdit 
              }
                
            ]
        }
    ]
})

const app = new Vue({
   store :store,
   router: router
}).$mount('#app')